<?php
/**
 * This file is part of the Yacms (http://www.yacms.org)
 * Copyright (c) 2019 gylr0505 (http://www.yacms.org)
 *
 * Author: 鬼一浪人 <gylr0505@163.com>
 *
 * DateTime: 19-10-29 下午9:38
 * Description:
 */
 
declare(strict_types = 1);

namespace App\Template\Log;

use Swoft\Redis\Redis;

class Record
{
    use LogTrait;

    private $id;

    private $is_success;

    public function __construct($id, $is_success)
    {
        $this->id = $id;
        $this->is_success = $is_success;
    }

    /**
     *
     */
    public function execute()
    {
        Redis::hIncrBy($this->generatorCurrentCacheHashKey(),$this->parseField(),1);
    }
}